package com.demo.design.behavioral.observer.impl;

import com.demo.design.behavioral.observer.Observer;
import com.demo.design.behavioral.observer.TargetSubject;

public class ElectricChargeSubject extends TargetSubject {
    @Override
    public void notifyObservers() {

        System.err.println("供电局下发了新通知：涨电价");
        for (Observer observer : observerList) {
            observer.response("电费涨了");
        }
    }
}
